//
//  TZSecondVC.swift
//  SimpleTZ
//
//  Created by wangfeng on 2020/7/9.
//  Copyright © 2020 davis. All rights reserved.
//

import UIKit

class TZSecondVC: TZBaseVC {
    var methodBtn: UIButton = {
          let btn = UIButton(type: .custom)
          btn.addTarget(self, action: #selector(methodOne), for: .touchUpInside)
          btn.setTitle("前往上一级界面", for: .normal)
          btn.titleLabel?.textColor = .red
          btn.backgroundColor = .green
          
          return btn
      }()
    override func viewDidLoad() {
        super.viewDidLoad()
        view.addSubview(methodBtn)
              methodBtn.snp.makeConstraints { (make) in
                  make.left.equalToSuperview().offset(20)
                  make.top.equalToSuperview().offset(80)
                  make.size.equalTo(CGSize(width: 120, height: 60))
              }
              
        // Do any additional setup after loading the view.
    }
    @objc func methodOne(){
        self.navigationController?.pushViewController(TZSecondVC(), animated: false)
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
